Hi guys, I recently tried to nest a generator in a generator, similar to this
def Nested_Generator(): x = (i for i in range(10)) y = (i*x[i] for i in range(10)) yield y
I discovered this doesn't work. I'm using python 3.6. How do you get around this?
My actually application is performing a list comprehension on a BeautifulSoup.findAll object. In order to format the data correctly I need to perform multiple list comprehensions. The resulting one I intend to write to an SQLlite database. The lists are getting out of hand... as you might expect.
You must be logged in to post. Please login or register an account.